package com.mallcloud.mall.common.core.constant.enums.mall;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 门店
 */
@Getter
@AllArgsConstructor
public enum StoreEnum {

	//字典
	REDEEM_STATUS("", ""),
	;

	private final String type;
	private final String description;

	@Getter
	@AllArgsConstructor
	public enum StoreTypeEnum {
		TYPE_1("1", "门店"),
		TYPE_2("2", "配送中心"),
		;
		private String code;
		private String description;

		public static String getDecs(String type) {
			return Arrays.stream(values()).filter(x -> x.getCode().equals(type)).findFirst().get().getDescription();
		}
	}
}
